const express = require('express');

let app = express();

let read = require('./middleware/read');

const path = require('path');


app.set('views', path.join(__dirname, 'views'));
app.set('view engine', 'ejs');

// process.cwd()  当前工作目录  

// __dirname  当前所在js文件所在的绝对路径

console.log("server",__dirname);

console.log("cwd",process.cwd());

app.use(express.static(process.cwd()));

app.use(read)

module.exports = app;